package cn.wolfcode.trip.base.service.impl;

import cn.wolfcode.trip.base.domain.CreditDetail;
import cn.wolfcode.trip.base.mapper.CreditDetailMapper;
import cn.wolfcode.trip.base.service.ICreditDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CreditDetailServiceImpl implements ICreditDetailService {
    @Autowired
    private CreditDetailMapper creditDetailMapper;


    @Override
    public void save(CreditDetail creditDetail) {
        creditDetailMapper.insert(creditDetail);
    }

    @Override
    public void delete(Long id) {
        creditDetailMapper.deleteByPrimaryKey(id);
    }

    @Override
    public List<CreditDetail> selectAll() {
        return creditDetailMapper.selectAll();
    }

    @Override
    public void update(CreditDetail creditDetail) {
        creditDetailMapper.updateByPrimaryKey(creditDetail);
    }

    @Override
    public CreditDetail get(Long id) {
        return creditDetailMapper.selectByPrimaryKey(id);
    }
}
